package org.jeecg.modules.accyentry.service.impl;

import java.util.List;
import java.util.Map;

import org.jeecg.modules.accyentry.entity.AccessoryEntry;
import org.jeecg.modules.accyentry.mapper.AccessoryEntryMapper;
import org.jeecg.modules.accyentry.service.IAccessoryEntryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * @Description:  配件出入库
 * @Author: jerryzhu
 * @Date:   2021-11-15
 * @Version: V1.0
 */
@Service
public class AccessoryEntryServiceImpl extends ServiceImpl<AccessoryEntryMapper, AccessoryEntry> implements IAccessoryEntryService {
	
	@Autowired
	AccessoryEntryMapper accessoryEntryMapper;
	
	/**
	 * 查询金出入库明细分页
	 */
	@Override
	public IPage<AccessoryEntry> selectAccessoryEntryPage(Page<AccessoryEntry> page, QueryWrapper<AccessoryEntry> queryWrapper) {
		return accessoryEntryMapper.selectAccessoryEntryPage(page, queryWrapper);
	}

	/**
	 * 查询仓库库存数据列表，不分页*
	 */
	@Override
	public List<AccessoryEntry> getAccessoryEntryStorageSummaryList(String storageId) {
		return accessoryEntryMapper.getAccessoryEntryStorageSummaryList(storageId);
	}
	
	/**
	 * 查询员工库存数据列表，不分页*
	 */
	@Override
	public List<AccessoryEntry> getAccessoryEntryPersonSummaryList(String userName) {
		return accessoryEntryMapper.getAccessoryEntryPersonSummaryList(userName);
	}

	/**获取仓库名字*/
	@Override
	public String getStorageName(String id) {
		return accessoryEntryMapper.getStorageName(id);
	}

	/**通过配件编号查找配件信息*/
	@Override
	public Map<String, String> queryAccessoryInfoByCodeNum(String codeNum) {
		return accessoryEntryMapper.queryAccessoryInfoByCodeNum(codeNum);
	}
	
}
